1. Field of the Invention
The present invention relates to an in-circuit emulator for debugging a program for a microcomputer to be mounted on a substrate. In the in-circuit emulator, a pod portion to be connected to the substrate and an emulator main body having a debugging function are housed in separate boxes and the pod portion and the emulator main body are connected through buses.
2. Description of the Prior Art
The in-circuit emulator is used for evaluating a function of a program for a microcomputer (a target microcomputer) to be mounted on a circuit substrate (target substrate) to be newly developed. As a representative in-circuit emulator, there is a system being composed of an emulator main body for evaluating a result of execution of a program, a pod portion mounted with an equivalent microcomputer to a target microcomputer, the pod portion which operates in place of the target microcomputer, and software for evaluation.
The pod portion is connected to the target substrate and the emulator main body. It standardizes signals which are different by the kinds of microcomputers to be evaluated and supplies the standardized signal to the emulator main body. One emulator main body can evaluate programs for many kinds of target microcomputers by using the pod portion as described in the above. The emulator main body is connected to the pod portion, a personal computer, an engineering work station, etc. The emulator main body has functions such as the detection of a breakpoint, a real time trace, the measurement of a program execution time, and measures the execution time of a real time trace or a program. The software for evaluation operates on a personal computer or an engineering work station and realizes the set control for various kinds of evaluation functions and the display control for evaluation results. The emulator main body executes the detection of a breakpoint and measures the execution time of a real time trace or a program, according to an instruction from a personal computer or an engineering work station operating under the software for evaluation. The results of the execution are transferred to the personal computer or the engineering work station.
FIG. 1 is a block diagram showing the configuration of a conventional in-circuit emulator. In FIG. 1, reference numeral 100 designates a pod portion mounted with an equivalent microcomputer to a target microcomputer; and 300, an emulator main body which evaluates a program execution result of a pod portion 100 based on a signal output from the pod portion 100.
In the pod portion 100, reference numeral 3 designates an emulation memory for storing a program being an evaluation object; 4, a microcomputer for executing a program stored in the emulation memory 3 with a reception of an execution instruction from the software for evaluation; 5, a dual-port RAM which is accessible from both microcomputer 4 and emulator main body 300; 6, a three-state buffer for making and breaking the connection between the emulation memory 3 and a bus 41 of the microcomputer 4; 7, a three-state buffer for making and breaking the connection between a bus 42, provided between the emulator main body 300 and the pod portion 100, and the emulation memory 3; which 8, a control circuit and when it receives an exclusive control signal from the emulator main body 300 telling that the emulator main body is going to access the emulation memory 3, it sets the three-state buffer 7 in a conductive state (not in a state of high impedance) and the three-state buffer 6 in a state of high impedance, and when it receives an execution instruction of a debug program from the emulator main body 300, it outputs the execution instruction to the microcomputer 4.
In the emulator main body 300, reference numeral 31 designates a controlling microcomputer which accesses the emulation memory 3 and outputs an execution instruction to the microcomputer 4; and 32, a debug circuit which executes the detection of a breakpoint, a real time trace, and the measurement of a program execution time, etc. Reference numeral 43 designates a control signal line for transmitting an exclusive control signal, an execution instruction, etc.
Next, the operation will be explained. The controlling microcomputer 31 of the emulator main body 300 downloads an object program for debugging into the emulation memory 3 of the pod portion 100 through the bus 42 and the three-state buffer 7. The object program for debugging is created on a personal computer or an engineering work station for example, and the program is transferred to the emulator main body 300 from the personal computer or the engineering work station. When the program is downloaded, the three-state buffer 7 is set in a conductive state and the three-state buffer 6 is set in a high impedance state.
When the object program for debugging is activated, the controlling microcomputer 31 of the emulator main body 300 outputs an execution instruction to a control circuit 8 in the pod portion 100. The control circuit 8 sets the microcomputer 4 in a executable state and it sets the three-state buffer 7 in a high impedance state and the three-state buffer 6 in a conductive state. The microcomputer 4 reads a program stored in the emulation memory 3 through the three-state buffer 6 and executes the program. The bus 41 of the microcomputer 4 is extended also to the emulator main body 300. Therefore, the debug circuit 32 is able to monitor the state of the bus 41. In a case where the setting of a breakpoint is made for example, the debug circuit 32 compares a state of the bus 41 with a break condition. In a case where the execution of a real time trace is set for example, the debug circuit 32 reads a signal on the bus 41 conforming to the trace condition and stores the taken-in signal.
When a break condition is realized, the debug circuit 32 informs the controlling microcomputer 31 about it. Then the controlling microcomputer 31 stops the execution of the microcomputer 4 through the control circuit 8 of the pod portion 100 and informs the personal computer or the engineering work station that the break condition is realized. The personal computer or the engineering work station is informed of the results of the real time trace in succession. When a user who grasps the program execution result through the personal computer or the engineering work station judges that the correction of the program is needed, he delivers a program correction instruction etc. to the emulator main body 300 through the personal computer or the engineering work station. Then the controlling microcomputer 31 of the emulator main body 300 outputs an exclusive control signal to the control circuit 8.
The control circuit 8 sets the three-state buffer 7 in a conductive state and sets the three-state buffer 6 in a high impedance state. Therefore, the controlling microcomputer 31 is made to be in an accessible state to the emulation memory 3 through a bus 42. In this state, the user inputs data for re-writing the program to the personal computer or the engineering work station. The controlling microcomputer 31 receives the data, and rewrites the contents of the program stored in the emulation memory 3 based on the data.
In the configuration as described in the above, since the emulator main body 300 takes in the other bus 42 than the bus for the microcomputer 4, controlling microcomputer 31 is able to approach various kinds of resources in the pod portion 100 during the operation of the microcomputer 4. In FIG. 1, a dual-port emulation memory 5 is shown as an example of such resources. However, when an evaluation object is a target microcomputer having a wide data bus or a wide address bus, the number of signal lines between the pod portion 100 and the emulation main body 300 is increased with the increase in the number of bits. Therefore, a problem occurs that the number of conductors of a cable to take in the busses, 41 and 42 is increased and flexibility of the cable is reduced.
Assuming that the microcomputer 4 and the controlling microcomputer 31 are both 16 bit microcomputers (address lines 24, data lines 16), a total number of signal lines amounts to 80.
Address lines: 24.times.2=48 PA1 Data lines: 16.times.2=32
In the case of an actual in-circuit emulator, there are other control signals than the data signals and the address signals even though the number of them is small.
In the case of an in-circuit emulator in which two busses 41 and 42 are provided between the pod portion 100 and the emulator main body 300, variety of resources in the pod portion 100 can be accessed during the operation of the microcomputer 4, but it has a problem within it that the number of signal lines between the pod portion 100 and the emulator main body 300 increases with the increase in the number of bits of the target microcomputer. The cost of parts such as connectors is increased and the countermeasure cost for EMI is also increased with the increase in the number of signal lines. Flexibility of a cable is reduced and the degree of freedom in the layout on a target substrate in the pod portion 100 is decreased.